package edu.ciee.tz.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import edu.ciee.tz.dao.UserDAO;
import edu.ciee.tz.model.User;

@Component("userManager")
public class UserManager {
	
	private UserDAO userDao;

	public UserDAO getUserDao() {
		return userDao;
	}
	
	@Resource
	public void setUserDao(UserDAO userDao) {
		this.userDao = userDao;
	}
	
	public boolean exists(User u)throws Exception{
		boolean ret=userDao.checkPermission(u);
		
		System.out.println(ret);
		
		return ret;
	}

}
